<?php

namespace common\components\office\grid;

/**
 * Column is the base class of all [[GridView]] column classes.
 *
 * For more details and usage information on Column, see the [guide article on data widgets](guide:output-data-widgets).
 *
 * @property \common\components\office\ExcelGridView $grid
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @since 2.0
 */
class Column extends \yii\grid\Column {

    /**
     * Renders the header cell.
     */
    public function renderHeaderCell() {
        return $this->renderHeaderCellContent();
    }

    /**
     * Renders the footer cell.
     */
    public function renderFooterCell() {
        return $this->renderFooterCellContent();
    }

    /**
     * Renders a data cell.
     * @param mixed $model the data model being rendered
     * @param mixed $key the key associated with the data model
     * @param int $index the zero-based index of the data item among the item array returned by [[GridView::dataProvider]].
     * @return string the rendering result
     */
    public function renderDataCell($model, $key, $index) {
        return $this->renderDataCellContent($model, $key, $index);
    }

}
